

import numpy as np
import pandas as pd

#import pandas_datareader.data as web
import datetime
import yfinance as yf


#s = pd.Series(np.random.random(2), index=["a", "b"])

s = pd.Series(np.random.random(2))

s = pd.Series({'a': 1, 'b': 2})

s = pd.Series({'a': 1, 'b': 2}, index=["a", "b", "c"])

s = pd.Series(2, index=["a", "b", "c"])


#print(s[:1])


df = pd.DataFrame({'one':[1., 2., 3., 5],'two':[1., 2., 3., 5.]})

df = pd.DataFrame([[1.,2,3.,5],[1.,2,3.,4.]],index=['a','b'],columns=['one','two','three','four'])

#print(df)
data=np.zeros((2,),dtype=[('A','i4'),('B','f4'),('C',"a10")])
#print(data)

data[:] = [(1,2.,'hello'),(2,3.,'world')]
df = pd.DataFrame(data,index=["first","second"])
#print(df)

edata = {'one': pd.Series([1., 2., 3.], index=["a", "b", "c"]), 'two': pd.Series([1., 2., 3, 4.], index=["a", "b", "c", "d"])}
df = pd.DataFrame(edata,index=['d','b','a'],columns=['two', 'three'])
# print(df.columns)
# print(df.loc[:, :])


#pd.read_csv()

#df_csvsave = web.DateReader('601233.SS','yahoo',datetime.datetime(2018,1,1),datetime.date.today())

aapl= yf.Ticker("HK1880")

print(aapl.history())
